Spirit levels have been used for centuries. They can be used for getting a true horizontal or true vertical. Some can even give you 45 degrees while others have a rotating dial that can be set to any degree between 0 and 90. Some can get you an instant reading along two axes.
Levels are sometimes used as a ruler to trace straight horizontal or vertical lines so as to mark a surface for later treatment, such as for lining up wainscotting or wallpaper.